<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Page Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" media="screen" href="main.css" />
    <script src="./jquery.min.js"></script>
    <style>
        body {
            font-size: 12px;
            line-height: 1.5;
            user-select: none;
            -webkit-font-smoothing: antialiased;
        }

        ul,
        li {
            margin: 0;
            padding: 0;
        }

        a {

            font-family: Microsoft Yahei, Arial, Lantinghei SC, Hiragino Sans GB, Helvetica Neue, Helvetica, sans-serif;
            box-sizing: border-box;
            text-decoration: none;
            color: inherit;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        }

        .header {
            height: 60px;
            background: #131d34;
            display: block;

            font-family: Microsoft Yahei, Arial, Lantinghei SC, Hiragino Sans GB, Helvetica Neue, Helvetica, sans-serif;
            box-sizing: border-box;

        }

        .container {
            width: 1180px;
            height: 100%;
            margin: 0 auto;
            position: relative;
            z-index: 1;
        }

        .container nav {
            height: 100%;
            margin-left: 150px;
        }

        .logoLink {
            background-image: url(./assets/logo.png);
            padding: 15px 0;
            height: 60px;
            width: 150px;
            background-size: 122px 26px;
            background-repeat: no-repeat;
            display: inline-block;
            background-position: 0 center;
            position: absolute;
            top: 0;
            left: 0;
        }

        .nav {
            display: inline-block;
            color: #fff;
            font-weight: 100;
            margin: 12px 0;
            font-size: 14px;
        }

        .commonNav {
            font-size: 14px;
            float: right;
            color: #fff;
            margin-top: 12px;
        }

        .navs li {
            display: inline-block;
            margin-right: 24px;
            padding: 10px 0;
            float: left;
        }

        .navs li a {
            color: #fff;
        }

        .navs li a:hover {
            color: #0b9eff;
        }

        .navs .controlli {
            margin-right: 0;
        }

        .controlli a {
            border: 1px solid #fff;
            border-radius: 2px;
            padding: 7px 7px 7px 30px;
            background: url(./assets/control.png) no-repeat 7px;
            background-size: 16px;
        }

        .navs .controlli a:hover {
            opacity: 1;
            background-color: #0b83e1;
            border-color: #0b83e1;
            color: #fff;
        }

        .showName span {
            display: none;
        }

        .showName {
            cursor: pointer;
            position: relative;
        }

        .showName span a {
            color: #0b9eff;
        }

        .showName:hover span {
            display: block;
            position: absolute;
            background: #fff;
            height: 40px;
            width: 100px;
            color: #333;
            text-align: center;
            font-size: 14px;
            line-height: 2.857;
            z-index: 99;
            border: 1px solid #ddd;
            top: 35px;
        }


        .login-li {
            position: relative;
        }

        .sub-nav {
            position: absolute;
            background: #fff;
            height: 40px;
            width: 100px;
            color: #333;
            text-align: center;
            font-size: 14px;
            line-height: 2.857;
            z-index: 99;
            border: 1px solid #ddd;
            top: 35px;
        }

        .logout-nav {
            
        }

        .logout-btn {
            color: #0b9eff!important;
            padding: 0!important;
            margin: 0!important;
        }
        .logout-btn a {
            color: #0b9eff!important;
        }

        .login-li:hover>.logout-nav {
            display: flex!important;
            justify-content: center;
            align-items: center;
        }
    </style>

    <script>

    var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?28a17f66627d87f1d046eae152a1c93d";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
    $(document).ready(function () {
        var url = "https://cloud.baidu.com/api/account/v2/displayName";
        $.getJSON(url + "?callback=?", null, function (json) {
            if (json.success && json.result.hasLogin) {
                $('.login-li').eq(1).remove();
                $('.login-li').eq(0).html('<span>' + json.result.displayName + '</span><ul class="sub-nav logout-nav" style="display: none;"><i class="arrow"></i><li class="logout-btn"><a href="http://passport.baidu.com/?logout&u=http%3A%2F%2Fbce.baidu.com">退出</a></>')
            }
        });
    });
    </script>
</head>

<body>
    <header class="header">

        <div class="container">
            <a href="/" class="logoLink"></a>
            <nav class="navs">
                <ul class="nav">
                    <li>
                        <a href="https://cloud.baidu.com/market/home" target="_blank">云市场首页</a>
                    </li>
                    <li>
                        <a href="https://cloud.baidu.com/market/list/0" target="_blank">商品</a>
                    </li>
                    <li>
                        <a href="https://cloud.baidu.com/market/coopration" target="_blank">合作伙伴</a>
                    </li>
                    <li>
                        <a href="https://cloud.baidu.com/market/campaign" target="_blank">免费体验馆</a>
                    </li>
                    <li>
                        <a href="https://cloud.baidu.com/market/prime" target="_blank">优选商城</a>
                    </li>
                </ul>
                <ul class="commonNav">
                    <li class="login-li">
                        <a href="https://login.bce.baidu.com/?account=&redirect=http%3A%2F%2Fconsole.bce.baidu.com%2F">登录</a>
                    </li>
                    <li class="login-li">
                        <a href="https://passport.baidu.com/v2/?reg&amp;tpl=bceplat&amp;u=https%3A//login.bce.baidu.com/" target="_blank" rel="noopener noreferrer">注册</a>
                    </li>
                    <li>
                        <a href="https://cloud.baidu.com/beian/index.html" target="blank">备案</a>
                    </li>
                    <li>
                        <a href="https://cloud.baidu.com/forum/bce" target="blank">论坛</a>
                    </li>
                    <li class="controlli">
                        <a href="https://console.bce.baidu.com" target="_blank">管理控制台</a>
                    </li>
                </ul>
            </nav>
        </div>
    </header>

</body>

</html>